package com.cx;

import java.util.concurrent.ArrayBlockingQueue;


public class CxJvmApplication {

   static  final ArrayBlockingQueue<String> queue = new ArrayBlockingQueue<>(1);

    public static void main(String[] args) throws InterruptedException {

//        ServiceLoader<PayService> myServices = ServiceLoader.load(PayService.class);
//
//        for (PayService payService : myServices) {
//            payService.showMyService();
//        }

        queue.put("ss");

        final String poll = queue.poll();
        if (poll == null) {
            System.out.println("ss被取走了");
        }



    }

}
